﻿<Window x:Class="SoftTeach.View.Datenbank.TendenzenDBView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:resources="clr-namespace:SoftTeach.Resources" xmlns:SoftTeach="clr-namespace:SoftTeach"
        xmlns:controls="clr-namespace:SoftTeach.Resources.Controls" mc:Ignorable="d" 
        Title="Datenbank - Tendenzen"
        Icon="/SoftTeach;component/Images/Database.ico"
             d:DesignHeight="400" d:DesignWidth="800" WindowStyle="SingleBorderWindow">
    <Window.Resources>
    </Window.Resources>
    <Grid Background="{StaticResource MainBackgroundBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="48"/>
            <RowDefinition Height="48"/>
            <RowDefinition/>
            <RowDefinition Height="32"/>
        </Grid.RowDefinitions>
        <controls:SmallDialogHeader  Icon="/SoftTeach;component/Images/Tendenz32.png" 
                              Grid.Row="0" 
                              Title="Ergänzen oder entfernen Sie hier Tendenzen."/>
        <Border Grid.Row="1" Name="DescriptionArea">
            <StackPanel Orientation="Horizontal" Margin="5">
                <Button Width="180" Height="32" Name="AddButton" Command="{Binding Path=AddTendenzCommand}">
                    <StackPanel Orientation="Horizontal">
                        <Grid>
                            <Image Source="/SoftTeach;component/Images/Tendenz32.png"/>
                            <Image Source="/SoftTeach;component/Images/AddOverlay32.png"/>
                        </Grid>
                        <Label Content="Tendenz hinzufügen"/>
                    </StackPanel>
                </Button>
                <Label></Label>
                <Button Width="180" Height="32" Name="RemoveButton" Command="{Binding Path=DeleteTendenzCommand}">
                    <StackPanel Orientation="Horizontal">
                        <Grid>
                            <Image Source="/SoftTeach;component/Images/Tendenz32.png"/>
                            <Image Source="/SoftTeach;component/Images/RemoveOverlay32.png"/>
                        </Grid>
                        <Label Content="Tendenz entfernen"/>
                    </StackPanel>
                </Button>
            </StackPanel>
        </Border>
        <GroupBox Grid.Row="2" Header="Tabelle der Tendenzen" Padding="3" Margin="5">
      <DataGrid SelectedItem="{Binding Path=CurrentTendenz, Mode=TwoWay}" ItemsSource="{Binding Source={x:Static SoftTeach:App.MainViewModel}, Path=Tendenzen}" AutoGenerateColumns="False">
                <DataGrid.Columns>
                    <DataGridTextColumn Header="Bezeichnung" Binding="{Binding Path=TendenzBezeichnung}" Width="*" />
                </DataGrid.Columns>
            </DataGrid>
        </GroupBox>
        <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right">
            <Button Name="OK" Width="80" Margin="3" IsDefault="True" Click="OKClick">OK</Button>
            <!--<Button Name="Abbrechen"  Width="80" Margin="3" IsCancel="True">Abbrechen</Button>-->
        </StackPanel>
    </Grid>
</Window>
